package 在字符串中找出连续最长的数字串;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNext()) { // 注意 while 处理多个 case
            String s = in.next();
            int start = -1, j = -1, len = 0;
            for (int i = 0; i < s.length(); i++) {
                if (s.charAt(i) >= '0' && s.charAt(i) <= '9') {
                    j = i + 1;
                    while (j < s.length() && s.charAt(j) >= '0' && s.charAt(j) <= '9') {
                        j++;
                    }
                    if (j - i > len) {
                        len = j - i;
                        start = i;
                    }
                    i = j;
                }
            }
            for (int i = start; i < start + len; i++) {
                System.out.print(s.charAt(i));
            }
            System.out.println("," + len);

        }
    }
}
